<?php

/**
 * Clientorder form base class.
 *
 * @method Clientorder getObject() Returns the current form's model object
 *
 * @package    briefingPropel
 * @subpackage form
 * @author     Your name here
 */
abstract class BaseClientorderForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'idOrder'               => new sfWidgetFormInputHidden(),
      'orderName'             => new sfWidgetFormInputText(),
      'textCategoryId'        => new sfWidgetFormPropelChoice(array('model' => 'Textcategories', 'add_empty' => false)),
      'is_website'            => new sfWidgetFormInputText(),
      'is_print'              => new sfWidgetFormInputText(),
      'is_newsletter'         => new sfWidgetFormInputText(),
      'is_poster'             => new sfWidgetFormInputText(),
      'is_blog'               => new sfWidgetFormInputText(),
      'otherTextMediumId'     => new sfWidgetFormPropelChoice(array('model' => 'Othertextmedium', 'add_empty' => true)),
      'targetGroupId'         => new sfWidgetFormPropelChoice(array('model' => 'Targetgroup', 'add_empty' => true)),
      'is_existing_custormer' => new sfWidgetFormInputText(),
      'is_new_customer'       => new sfWidgetFormInputText(),
      'is_women'              => new sfWidgetFormInputText(),
      'is_men'                => new sfWidgetFormInputText(),
      'formalStyleId'         => new sfWidgetFormPropelChoice(array('model' => 'Formalstyle', 'add_empty' => false)),
      'personStyleId'         => new sfWidgetFormPropelChoice(array('model' => 'Personstyle', 'add_empty' => false)),
      'emotionStyleId'        => new sfWidgetFormPropelChoice(array('model' => 'Emotionstyle', 'add_empty' => false)),
      'formulateId'           => new sfWidgetFormPropelChoice(array('model' => 'Formulatetext', 'add_empty' => false)),
      'freeTextId'            => new sfWidgetFormPropelChoice(array('model' => 'Freetext', 'add_empty' => true)),
      'urlImageStructure'     => new sfWidgetFormInputText(),
      'is_standard'           => new sfWidgetFormInputText(),
      'editionOptionsId'      => new sfWidgetFormPropelChoice(array('model' => 'Editionoptions', 'add_empty' => true)),
      'created_at'            => new sfWidgetFormDateTime(),
      'expires_at'            => new sfWidgetFormDateTime(),
      'updated_at'            => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'idOrder'               => new sfValidatorChoice(array('choices' => array($this->getObject()->getIdorder()), 'empty_value' => $this->getObject()->getIdorder(), 'required' => false)),
      'orderName'             => new sfValidatorString(array('max_length' => 45)),
      'textCategoryId'        => new sfValidatorPropelChoice(array('model' => 'Textcategories', 'column' => 'idTextCategories')),
      'is_website'            => new sfValidatorInteger(array('min' => -128, 'max' => 127)),
      'is_print'              => new sfValidatorInteger(array('min' => -128, 'max' => 127)),
      'is_newsletter'         => new sfValidatorInteger(array('min' => -128, 'max' => 127)),
      'is_poster'             => new sfValidatorInteger(array('min' => -128, 'max' => 127)),
      'is_blog'               => new sfValidatorInteger(array('min' => -128, 'max' => 127)),
      'otherTextMediumId'     => new sfValidatorPropelChoice(array('model' => 'Othertextmedium', 'column' => 'idOtherTextMedium', 'required' => false)),
      'targetGroupId'         => new sfValidatorPropelChoice(array('model' => 'Targetgroup', 'column' => 'idTargetGroup', 'required' => false)),
      'is_existing_custormer' => new sfValidatorInteger(array('min' => -128, 'max' => 127)),
      'is_new_customer'       => new sfValidatorInteger(array('min' => -128, 'max' => 127)),
      'is_women'              => new sfValidatorInteger(array('min' => -128, 'max' => 127)),
      'is_men'                => new sfValidatorInteger(array('min' => -128, 'max' => 127)),
      'formalStyleId'         => new sfValidatorPropelChoice(array('model' => 'Formalstyle', 'column' => 'idFormalStyle')),
      'personStyleId'         => new sfValidatorPropelChoice(array('model' => 'Personstyle', 'column' => 'idPersonStyle')),
      'emotionStyleId'        => new sfValidatorPropelChoice(array('model' => 'Emotionstyle', 'column' => 'idEmotionStyle')),
      'formulateId'           => new sfValidatorPropelChoice(array('model' => 'Formulatetext', 'column' => 'idFormulateText')),
      'freeTextId'            => new sfValidatorPropelChoice(array('model' => 'Freetext', 'column' => 'idFreeText', 'required' => false)),
      'urlImageStructure'     => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'is_standard'           => new sfValidatorInteger(array('min' => -128, 'max' => 127)),
      'editionOptionsId'      => new sfValidatorPropelChoice(array('model' => 'Editionoptions', 'column' => 'idEditionOptions', 'required' => false)),
      'created_at'            => new sfValidatorDateTime(array('required' => false)),
      'expires_at'            => new sfValidatorDateTime(array('required' => false)),
      'updated_at'            => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->validatorSchema->setPostValidator(
      new sfValidatorPropelUnique(array('model' => 'Clientorder', 'column' => array('idOrder')))
    );

    $this->widgetSchema->setNameFormat('clientorder[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Clientorder';
  }


}
